const koa = require('koa-router')
const pushcontent = new koa
const {verifyAuth} = require("../middleware/auth.middleware")
const {create,gettext,putarticle,textdelete ,articlereply,getarticlereply,getallarticlereply,getcomment,setcomment}= require("../controller/pushcontent")
 //接口  创建文章  修改文章  删除文章(有对应的权限) 
 pushcontent.post('/article',create)

//文章查询
pushcontent.get('/article',gettext )

// 文章赞同
pushcontent.put('/endorse',putarticle)

//文章删除
pushcontent.put('/article',verifyAuth, textdelete)

//新增文章回答
pushcontent.post('/article/reply',articlereply )
//文章回答查询 
pushcontent.get('/article/reply',getarticlereply )
//查看全部文章
pushcontent.get("/article/allreply",getallarticlereply)
//获取文章评论 
pushcontent.get("/article/comment",getcomment)
//添加评论
pushcontent.post("/article/setcomment",setcomment)




module.exports = pushcontent;